projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
766f4bc
)
shortcuttrigger: Fix some leaks in error paths
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 8 Jul 2020 21:42:29 +0000
(17:42 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 8 Jul 2020 21:44:42 +0000
(17:44 -0400)
Found while running the testsuite under asan.
gtk/gtkshortcuttrigger.c
patch
|
blob
|
history
diff --git
a/gtk/gtkshortcuttrigger.c
b/gtk/gtkshortcuttrigger.c
index 15268ef464c7c3e9b21a0ec055e77278b817506f..65e3164b5b2744245e51e12e25a694d682edd49f 100644
(file)
--- a/
gtk/gtkshortcuttrigger.c
+++ b/
gtk/gtkshortcuttrigger.c
@@
-142,11
+142,17
@@
gtk_shortcut_trigger_parse_string (const char *string)
/* empty first slot */
if (*frag_a == '\0')
- return NULL;
+ {
+ g_free (frag_a);
+ return NULL;
+ }
/* empty second slot */
if (*frag_b == '\0')
- return NULL;
+ {
+ g_free (frag_a);
+ return NULL;
+ }
t1 = gtk_shortcut_trigger_parse_string (frag_a);
if (t1 == NULL)